package com.zjitc.controller;


import com.zjitc.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/19 16:43
 * @description:
 */
@Controller
public class ParamController {
  @RequestMapping("/param")
  @ResponseBody
 public String param(@RequestParam(name = "id") Integer id,String name){
   return "id= " +id + " name= " + name;
 }
 @RequestMapping("/params")
 @ResponseBody
 public String param2(User user){
   return user.toString();
 }
}
